Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

a(lambda(x), y) → lambda(a(x, p(1, a(y, t))))
a(p(x, y), z) → p(a(x, z), a(y, z))
a(a(x, y), z) → a(x, a(y, z))
lambda(x) → x
a(x, y) → x
a(x, y) → y
p(x, y) → x
p(x, y) → y

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

a(lambda(x), y) → lambda(a(x, p(1, a(y, t))))
a(p(x, y), z) → p(a(x, z), a(y, z))
a(a(x, y), z) → a(x, a(y, z))
lambda(x) → x
a(x, y) → x
a(x, y) → y
p(x, y) → x
p(x, y) → y

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

A(a(x, y), z) → A(y, z)
A(p(x, y), z) → P(a(x, z), a(y, z))
A(p(x, y), z) → A(x, z)
A(lambda(x), y) → A(y, t)
A(lambda(x), y) → LAMBDA(a(x, p(1, a(y, t))))
A(a(x, y), z) → A(x, a(y, z))
A(p(x, y), z) → A(y, z)
A(lambda(x), y) → P(1, a(y, t))
A(lambda(x), y) → A(x, p(1, a(y, t)))

The TRS R consists of the following rules:

a(lambda(x), y) → lambda(a(x, p(1, a(y, t))))
a(p(x, y), z) → p(a(x, z), a(y, z))
a(a(x, y), z) → a(x, a(y, z))
lambda(x) → x
a(x, y) → x
a(x, y) → y
p(x, y) → x
p(x, y) → y

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

A(a(x, y), z) → A(y, z)
A(p(x, y), z) → P(a(x, z), a(y, z))
A(p(x, y), z) → A(x, z)
A(lambda(x), y) → A(y, t)
A(lambda(x), y) → LAMBDA(a(x, p(1, a(y, t))))
A(a(x, y), z) → A(x, a(y, z))
A(p(x, y), z) → A(y, z)
A(lambda(x), y) → P(1, a(y, t))
A(lambda(x), y) → A(x, p(1, a(y, t)))

The TRS R consists of the following rules:

a(lambda(x), y) → lambda(a(x, p(1, a(y, t))))
a(p(x, y), z) → p(a(x, z), a(y, z))
a(a(x, y), z) → a(x, a(y, z))
lambda(x) → x
a(x, y) → x
a(x, y) → y
p(x, y) → x
p(x, y) → y

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
QDP
          ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

A(a(x, y), z) → A(y, z)
A(p(x, y), z) → A(x, z)
A(lambda(x), y) → A(y, t)
A(a(x, y), z) → A(x, a(y, z))
A(p(x, y), z) → A(y, z)
A(lambda(x), y) → A(x, p(1, a(y, t)))

The TRS R consists of the following rules:

a(lambda(x), y) → lambda(a(x, p(1, a(y, t))))
a(p(x, y), z) → p(a(x, z), a(y, z))
a(a(x, y), z) → a(x, a(y, z))
lambda(x) → x
a(x, y) → x
a(x, y) → y
p(x, y) → x
p(x, y) → y

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


A(lambda(x), y) → A(y, t)
A(lambda(x), y) → A(x, p(1, a(y, t)))
The remaining pairs can at least be oriented weakly.

A(a(x, y), z) → A(y, z)
A(p(x, y), z) → A(x, z)
A(a(x, y), z) → A(x, a(y, z))
A(p(x, y), z) → A(y, z)
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(1) = 0   
POL(A(x1, x2)) = x1 + x2   
POL(a(x1, x2)) = x1 + x2   
POL(lambda(x1)) = 1 + x1   
POL(p(x1, x2)) = max(x1, x2)   
POL(t) = 0   

The following usable rules [17] were oriented:

a(p(x, y), z) → p(a(x, z), a(y, z))
a(lambda(x), y) → lambda(a(x, p(1, a(y, t))))
lambda(x) → x
a(a(x, y), z) → a(x, a(y, z))
a(x, y) → y
a(x, y) → x
p(x, y) → y
p(x, y) → x



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ QDPOrderProof
QDP
              ↳ QDPSizeChangeProof

Q DP problem:
The TRS P consists of the following rules:

A(a(x, y), z) → A(y, z)
A(p(x, y), z) → A(x, z)
A(a(x, y), z) → A(x, a(y, z))
A(p(x, y), z) → A(y, z)

The TRS R consists of the following rules:

a(lambda(x), y) → lambda(a(x, p(1, a(y, t))))
a(p(x, y), z) → p(a(x, z), a(y, z))
a(a(x, y), z) → a(x, a(y, z))
lambda(x) → x
a(x, y) → x
a(x, y) → y
p(x, y) → x
p(x, y) → y

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs: